package com.xp.tinyurl.schedule;

import com.xp.tinyurl.service.MaxUuidService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@EnableScheduling
@Component
public class MaxUuidUpdateDbJob {

    @Autowired
    private MaxUuidService maxUuidService;

    @Scheduled(fixedDelay = 1000)
    public void cache2db(){
        maxUuidService.cache2db();
    }

}
